package com.coldchain.admin.resoure.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.coldchain.common.vo.TreeNodeVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 菜单
 * </p>
 *
 * @author fangliai
 * @since 2018-08-28
 */
@TableName("ch_menu")
@ApiModel
public class Menu extends TreeNodeVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(hidden = true)
	private Integer id;
    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单标题",required = true)
	private String title;


    /**
     * 模块Id
     */
    @ApiModelProperty(value = "系统模块",required = true)
	@TableField("sysmodel")
	private String sysmodel;
    /**
     * 请求路径
     */
    @ApiModelProperty(value = "资源路径",required = true)
	private String url;
    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "icon",required = false)
	private String icon;
    /**
     * 为0则表示父节点
     */
    @ApiModelProperty(value = "父节点",required = false)
	private Integer parent;
    /**
     * 是否 已删除
     */
    @JSONField(serialize = false)
    @ApiModelProperty(hidden = true)
    @TableLogic
	private Integer delateFlag;
    /**
     * 版本号
     */
    @JSONField(serialize = false)
    @ApiModelProperty(hidden = true)
    @Version
	private Integer vesion;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述",required = false)
	private String describes;
    /**
     * 创建时间
     */
    @ApiModelProperty(hidden = true)
	private Date createTime;
    /**
     * 创那人
     */
    @ApiModelProperty(hidden = true)
	private String createBy;
    /**
     * 变更时间
     */
    @ApiModelProperty(hidden = true)
	private Date modTime;
    /**
     * 变更人
     */
    @ApiModelProperty(hidden = true)
	private String modBy;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSysmodel() {
		return sysmodel;
	}

	public void setSysmodel(String sysmodel) {
		this.sysmodel = sysmodel;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Integer getParent() {
		return parent;
	}

	public void setParent(Integer parent) {
		this.parent = parent;
	}

	public Integer getDelateFlag() {
		return delateFlag;
	}

	public void setDelateFlag(Integer delateFlag) {
		this.delateFlag = delateFlag;
	}

	public Integer getVesion() {
		return vesion;
	}

	public void setVesion(Integer vesion) {
		this.vesion = vesion;
	}

	public String getDescribes() {
		return describes;
	}

	public void setDescribes(String describes) {
		this.describes = describes;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getModTime() {
		return modTime;
	}

	public void setModTime(Date modTime) {
		this.modTime = modTime;
	}

	public String getModBy() {
		return modBy;
	}

	public void setModBy(String modBy) {
		this.modBy = modBy;
	}

    @Override
    public Object getNodeId() {
        return this.id;
    }

    @Override
    public Object getParentId() {
        return this.parent;
    }


}
